import request from '@/config/axios'

// 基本薪资规则 VO
export interface RulesBasepayVO {
  id: number // 主键ID
  tieId: number // 职称ID
  seqId: number // 序列ID
  depId: number // 所属部门
  amount: number // 工资标准
}

// 基本薪资规则 API
export const RulesBasepayApi = {
  // 查询基本薪资规则分页
  getRulesBasepayPage: async (params: any) => {
    return await request.get({ url: `/pm/rules-basepay/page`, params })
  },

  // 查询基本薪资规则详情
  getRulesBasepay: async (id: number) => {
    return await request.get({ url: `/pm/rules-basepay/get?id=` + id })
  },

  // 新增基本薪资规则
  createRulesBasepay: async (data: RulesBasepayVO) => {
    return await request.post({ url: `/pm/rules-basepay/create`, data })
  },

  // 修改基本薪资规则
  updateRulesBasepay: async (data: RulesBasepayVO) => {
    return await request.put({ url: `/pm/rules-basepay/update`, data })
  },

  // 删除基本薪资规则
  deleteRulesBasepay: async (id: number) => {
    return await request.delete({ url: `/pm/rules-basepay/delete?id=` + id })
  },

  // 导出基本薪资规则 Excel
  exportRulesBasepay: async (params) => {
    return await request.download({ url: `/pm/rules-basepay/export-excel`, params })
  },
}